from .base import *

SHELL_PLUS = 'ipython'  # python manage.py shell 使用ipython

ALLOWED_HOSTS = ['*']

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

# ----------------------------------------------
# 在控制台打印 sql 语句
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'simple': {
            'format': '[%(asctime)s] %(message)s'
        },
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'simple'
        },
    },
    'loggers': {
        # 'django': {
        #     'handlers': ['console'],
        #     'level': 'INFO',
        # },
        'django.db': {
            'handlers': ['console'],
            'level': 'DEBUG',
        }
    },
}
